home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tas412.zip / PCTF.TAS < prev    next >
Text File  |  1992-11-22  |  611b  |  33 lines

  1. #output_file f%.lst
  2. #max_quotes 100
  3. { Script to calculate %F as described by
  4.   Tushar Chande in the May 1992 issue of TASC 
  5.  
  6.   %F = Today's Close - The 5 day TSF of yesterday
  7.        ------------------------------------------    * 100
  8.                    Today's Close
  9.  
  10.   This script illustrates the use of the REF function to shift a series
  11.   or array forward.
  12.  
  13. }
  14. pctF : array;
  15. tsfA : array;
  16. tsfA = tsf(C,5);
  17.  
  18. pctF = mulBy( div( ( sub( C,REF( tsfA,-1 ) ) ),C ) , 100 );
  19. {dump_array(c,tsfA,pctf);
  20. return;}
  21. openGraph(2);
  22. sizeGraph(2,1);
  23. Graph(1);
  24. Graph(pctF,'Chandes %F');
  25. closeGraph();
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.